<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Global</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Global</h1>

    




<section>

<header>
    
        <h2></h2>
        
    
</header>

<article>
    <div class="container-overview">
    
        

        


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


        
    
    </div>

    

    

    

    

    

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<h4 class="name" id="Default_ChiVoxPlayer_Options"><span class="type-signature">(constant) </span>Default_ChiVoxPlayer_Options<span class="type-signature"></span></h4>




<div class="description">
    初始化播放器实例的默认值。<br/>
</div>







    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>mode</code></td>
            

            <td class="type">
            
                
<span class="param-type">enum</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            

            <td class="description last">指定播放器的模式。可以指定为ChiVoxSDK.MODE.HTML5(默认值) 或 ChiVoxSDK.MODE.FLASH。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>appKey</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">指定播放器使用的appKey（由驰声提供）。**必填**</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>sigurl</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">指定播放器获取sig和timestamp的服务器地址（sig算法由驰声提供）。**必填**</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>playerid</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            

            <td class="description last">指定播放器渲染在当前页面的DOM节点ID。默认值: chivox-player</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onInit</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">播放器K初始化完成后的Callback调用。格式：(code, message) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onError</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">播放器初始化或运行期间出错时的Callback调用。格式：(error) => {}</td>
        </tr>

    
    </tbody>
</table>




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="playerbuilder.js.html">playerbuilder.js</a>, <a href="playerbuilder.js.html#line32">line 32</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="Default_ChiVoxRecorder_Options"><span class="type-signature">(constant) </span>Default_ChiVoxRecorder_Options<span class="type-signature"></span></h4>




<div class="description">
    初始化录音机实例的默认值。<br/>
</div>







    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>mode</code></td>
            

            <td class="type">
            
                
<span class="param-type">enum</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            

            <td class="description last">指定录音机的模式。可以指定为ChiVoxSDK.MODE.HTML5(默认值) 或 ChiVoxSDK.MODE.FLASH。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>appKey</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">指定录音机使用的appKey（由驰声提供）。**必填**</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>sigurl</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">指定录音机获取sig和timestamp的服务器地址（sig算法由驰声提供）。**必填**</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>recorderid</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            

            <td class="description last">指定录音机渲染在当前页面的DOM节点ID。默认值: chivox-recorder</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">参数解释详见：<a href="global.html#Default_ChiVoxSDK_Options">Default_ChiVoxSDK_Options</a></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>width</code></td>
            

            <td class="type">
            
                
<span class="param-type">int</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">录音机的波形图宽度, 默认值220px。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>height</code></td>
            

            <td class="type">
            
                
<span class="param-type">int</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">录音机的波形图高度, 默认值140px。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>showFlash</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">Flash模式下是否显示Flash。默认：true</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>backgroundColor</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">Flash模式下显示Flash的背景, 默认："0x00fffff"。(已过期)</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>wmode</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">Flash模式下显示Flash的的模式。默认值："transparent"</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onInit</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">录音机初始化完成后的Callback调用。格式：(code, message) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onError</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">录音机初始化或运行期间出错时的Callback调用。格式：(error) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onConnectorStatusChange</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">录音机与服务器的连接状态发生变化时的Callback调用。格式：(code, message) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onMicStatusChange</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">Flash模式下，麦克风状态发生变化时的Callback调用。格式：() => {}</td>
        </tr>

    
    </tbody>
</table>




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="recorderbuilder.js.html">recorderbuilder.js</a>, <a href="recorderbuilder.js.html#line32">line 32</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="Default_ChiVoxSDK_Options"><span class="type-signature">(constant) </span>Default_ChiVoxSDK_Options<span class="type-signature"></span></h4>




<div class="description">
    初始化ChiVoxSDK实例的默认值。<br/>
</div>







    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>mode</code></td>
            

            <td class="type">
            
                
<span class="param-type">enum</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            

            <td class="description last">指定SDK的模式。可以指定为ChiVoxSDK.MODE.HTML5(默认值) 或 ChiVoxSDK.MODE.FLASH。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>server</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            

            <td class="description last">指定SDK的评分服务器地址。默认值: ws://cloud.chivox.com</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>bak_server</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            

            <td class="description last">指定SDK的评分备份服务器地址。默认值: ''</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>appKey</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">指定SDK的开始评分所使用的appKey（由驰声提供）。**必填**</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>sigurl</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">指定SDK的开始评分前获取sig和timestamp的服务器地址（sig算法由驰声提供）。**必填**</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>recorder</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            

            <td class="description last">是否创建录音机。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>player</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            

            <td class="description last">是否创建播放器。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>playDing</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            

            <td class="description last">录音前，是否播放"Ding"音频。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">录音和播放音频所需的参数列表，如下：
                <h6>Properties</h6>

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>audioUrl</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">播放的音频URL。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>serverParams</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">录音所需的参数列表，下面描述几个基本的，更多请参考Example或联系驰声提供。
                <h6>Properties</h6>

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>coreType</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">录音使用的内核类型。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>refText</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">录音使用的参考文本。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>rank</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">录音使用的分制。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>userId</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">录音的终端用户ID，用于统计和分析用户更多的数据。</td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onInit</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">SDK初始化完成后的Callback调用。格式：(code, message) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onError</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">SDK初始化或运行期间出错时的Callback调用。格式：(error) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onConnectorStatusChange</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">SDK在与服务器的连接状态发生变化时的Callback调用。格式：(code, message) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onAfterPlay</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">开始播放音频后的Callback调用。格式：(element) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onBeforeRecord</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">开始录音前的Callback调用。格式：() => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onMicStatusChange</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">Flash模式下，麦克风状态发生变化时的Callback调用。格式：() => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onScore</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">评分结果返回时的Callback调用。格式：(data) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onInternalScore-</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">段落评分时实时push下来当前句子评测结果时的Callback调用。格式：(data) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onScoreError</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">评分结果返回时的Callback调用。格式：(errorType) => {}</td>
        </tr>

    
    </tbody>
</table>




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="chivoxsdk.js.html">chivoxsdk.js</a>, <a href="chivoxsdk.js.html#line51">line 51</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="Default_Paragraph_Options"><span class="type-signature">(constant) </span>Default_Paragraph_Options<span class="type-signature"></span></h4>




<div class="description">
    初始化Paragraph实例的默认值。<br/>
</div>







    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>mode</code></td>
            

            <td class="type">
            
                
<span class="param-type">enum</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            

            <td class="description last">指定Paragraph的模式。可以指定为ChiVoxSDK.MODE.HTML5(默认值) 或 ChiVoxSDK.MODE.FLASH。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>server</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            

            <td class="description last">指定Paragraph的评分服务器地址。默认值: ws://cloud.chivox.com</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>bak_server</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            

            <td class="description last">指定Paragraph的评分备份服务器地址。默认值: ''</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>appKey</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">指定Paragraph的开始评分所使用的appKey（由驰声提供）。**必填**</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>sigurl</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">指定Paragraph的开始评分前获取sig和timestamp的服务器地址（sig算法由驰声提供）。**必填**</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>playDing</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                </td>
            

            

            <td class="description last">录音前，是否播放"Ding"音频。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">录音和播放音频所需的参数列表，如下：
                <h6>Properties</h6>

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>audioUrl</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">播放的音频URL。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>serverParams</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">录音所需的参数列表，下面描述几个基本的，更多请参考Example或联系驰声提供。
                <h6>Properties</h6>

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>coreType</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">录音使用的内核类型。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>refText</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">录音使用的参考文本。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>rank</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">录音使用的分制。</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>userId</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">录音的终端用户ID，用于统计和分析用户更多的数据。</td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onInit</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">初始化完成后的Callback调用。格式：(code, message) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onError</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">初始化或运行期间出错时的Callback调用。格式：(error) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onReset</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">重置后的Callback调用。格式：() => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onBeforePlay</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">播放当前段音频前的Callback调用。格式：(i) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onPlay</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">开始播放当前段音频时的Callback调用。格式：() => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onAfterPlay</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">当前段音频播放后的Callback调用。格式：(i) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onBeforeRecord</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">当前段开始录音前的Callback调用。格式：(i) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onRecord</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">当前段录音开始时的Callback调用。格式：() => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onAfterRecord</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">当前段录音完成后的Callback调用。格式：(i) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onScore</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">当前段评分结果返回时的Callback调用。格式：(data, partIndex) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onBeforeReplay</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">当前段回放录音前的Callback调用。格式：(i) => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onReplay</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">回放当前段录音时的Callback调用。格式：() => {}</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onAfterReplay</code></td>
            

            <td class="type">
            
                
<span class="param-type">callback</span>


            
            </td>

            
                <td class="attributes">
                

                
                </td>
            

            

            <td class="description last">当前段录音回放完成后的Callback调用。格式：() => {}</td>
        </tr>

    
    </tbody>
</table>




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="lib_paragraph.js.html">lib/paragraph.js</a>, <a href="lib_paragraph.js.html#line37">line 37</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="get_sig"><span class="type-signature"></span>get_sig<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    废弃函数。JS版的sig和timestamp生成算法。
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="lib_public.js.html">lib/public.js</a>, <a href="lib_public.js.html#line110">line 110</a>
    </li></ul></dd>
    

    

    

    
</dl>


















        
            

    

    
    <h4 class="name" id="tts"><span class="type-signature"></span>tts<span class="signature">(options)</span><span class="type-signature"> &rarr; {int}</span></h4>
    

    



<div class="description">
    公用的TTS(Text To Speech)转换函数，以HTTP FORM的方式提交TTS参数，并下载转换后的音频。
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">TTS转换所需的参数，详细如下：
                <h6>Properties</h6>
                

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>uid</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">TTS转换所需的uid</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>appkey</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">TTS转换所需的appKey</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>sig</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">TTS转换所需的sig</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>timestamp</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">TTS转换所需的timestamp</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>text</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">要转换的文本</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>coreType</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">要使用的TTS内核</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>resource</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">要使用的TTS资源</td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="lib_public.js.html">lib/public.js</a>, <a href="lib_public.js.html#line44">line 44</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    - 会直接下载转换后的音频，如有其它需求，可以参考这个函数实现，用http post的方式来模拟。
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">int</span>


    </dd>
</dl>

    





        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-ChiVoxSDK.html">ChiVoxSDK</a></li><li><a href="module-ChiVoxSDK_flash.html">ChiVoxSDK/flash</a></li><li><a href="module-ChiVoxSDK_html5.html">ChiVoxSDK/html5</a></li><li><a href="module-ChiVoxSDK_lib.html">ChiVoxSDK/lib</a></li><li><a href="module-ChiVoxSDK_Paragraph.html">ChiVoxSDK/Paragraph</a></li><li><a href="module-ChiVoxSDK_score.html">ChiVoxSDK/score</a></li></ul><h3>Classes</h3><ul><li><a href="module-ChiVoxSDK_flash.FlashPlayer.html">FlashPlayer</a></li><li><a href="module-ChiVoxSDK_flash.FlashRecorder.html">FlashRecorder</a></li><li><a href="module-ChiVoxSDK_html5.Html5Player.html">Html5Player</a></li><li><a href="module-ChiVoxSDK_html5.Html5Recorder.html">Html5Recorder</a></li><li><a href="module-ChiVoxSDK_html5-VolumeBar.html">VolumeBar</a></li><li><a href="module-ChiVoxSDK_lib-EnScoreMap.html">EnScoreMap</a></li><li><a href="module-ChiVoxSDK_lib-StatusCode.html">StatusCode</a></li><li><a href="module-ChiVoxSDK_Paragraph-Paragraph.html">Paragraph</a></li><li><a href="module-ChiVoxSDK_score-Char.html">Char</a></li><li><a href="module-ChiVoxSDK_score-CnSentScore.html">CnSentScore</a></li><li><a href="module-ChiVoxSDK_score-CnWordScore.html">CnWordScore</a></li><li><a href="module-ChiVoxSDK_score-EnSentRec.html">EnSentRec</a></li><li><a href="module-ChiVoxSDK_score-EnSentScore.html">EnSentScore</a></li><li><a href="module-ChiVoxSDK_score-EnWordScore.html">EnWordScore</a></li><li><a href="module-ChiVoxSDK_score-Phone.html">Phone</a></li><li><a href="module-ChiVoxSDK_score-Word.html">Word</a></li><li><a href="module-ChiVoxSDK-ChiVoxSDK.html">ChiVoxSDK</a></li><li><a href="module-ChiVoxSDK-ControlPanel.html">ControlPanel</a></li><li><a href="module-ChiVoxSDK-Dialog.html">Dialog</a></li><li><a href="module-ChiVoxSDK-PlayerBuilder.html">PlayerBuilder</a></li><li><a href="module-ChiVoxSDK-ProgressBar.html">ProgressBar</a></li><li><a href="module-ChiVoxSDK-RecorderBuilder.html">RecorderBuilder</a></li></ul><h3>Namespaces</h3><ul><li><a href="public.html">public</a></li><li><a href="Utils.html">Utils</a></li></ul><h3>Global</h3><ul><li><a href="global.html#Default_ChiVoxPlayer_Options">Default_ChiVoxPlayer_Options</a></li><li><a href="global.html#Default_ChiVoxRecorder_Options">Default_ChiVoxRecorder_Options</a></li><li><a href="global.html#Default_ChiVoxSDK_Options">Default_ChiVoxSDK_Options</a></li><li><a href="global.html#Default_Paragraph_Options">Default_Paragraph_Options</a></li><li><a href="global.html#get_sig">get_sig</a></li><li><a href="global.html#tts">tts</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Sep 21 2017 16:38:41 GMT+0800 (CST)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>